import 'package:flutter/material.dart';

class FriendPageWidget extends StatefulWidget{

  const FriendPageWidget({super.key});


  @override
  State<StatefulWidget> createState() {
    return _FriendPageState();
  }

}

class _FriendPageState extends State<FriendPageWidget>{

  int _counter = 0;

  void _incrementCounter(){
    setState((){
      _counter ++;
    });
  }

  @override
  Widget build(context) {

    return Scaffold(
      appBar: AppBar(
        title: const Text("Friend Page"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text('You have pushed the button this many times: '),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headlineSmall,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ),
    );
  }

}